<template>
    <div class="centent">
        <div class="bac">
            <span style="font-size: 14px;">{{ $t('總資產') }}</span>
            <span style="font-size: 22px;margin: 8px 0;">0BTC</span>
            <span>≈$0</span>
        </div>
        <div class="items">
            <div @click="goto('/transfer')" class="item">{{ $t('轉移') }}</div>
            <div @click="goto('/transferout')" class="item">{{ $t('轉帳') }}</div>
        </div>
        <div class="search">
            <div class="left">
                <van-checkbox checked-color="#f2ce3d" v-model="checked">{{ $t('隱藏小額資產') }}</van-checkbox>
            </div>
            <div class="right">
                <van-icon name="search" size="22px" color="#ccc" />
                <input class="ipt" type="text">
            </div>
        </div>
        <div class="cont">
            <div class="til">
                <span>{{ $t('幣種') }}</span>
                <span>{{ $t('凍結') }}</span>
                <span>{{ $t('可用餘額') }}</span>
            </div>
            <div @click="goto('/coin')" class="item" v-for="item in 10">
                <div class="div1">
                    <img style="width: 28px;height: 28px;" src="@/assets/account/usdt.png" alt="">
                    <span>USDT</span>
                </div>
                <div class="div2">
                    <div style="font-size: 14px;">0</div>
                    <div style="color: #d5d5d5;">$0</div>
                </div>
                <div class="div3">
                    <div style="font-size: 14px;">0</div>
                    <div style="color: #d5d5d5;">$0</div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router';
const router = useRouter()

const checked = ref(true)

function goto(url) {
    router.push(url)
}
</script>

<style lang="scss" scoped>
.centent {
    padding: 64px 15px 15px 15px;
    background-color: #17171a;

    .bac {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 108px;
        background-image: url('@/assets/account/bac.png');
        background-size: 100% 100%;
        color: #fff;
        font-size: 12px;
        padding: 20px;
        box-sizing: border-box;
        margin-bottom: 20px;
    }

    .items {
        display: flex;
        justify-content: space-between;
        width: 100%;
        height: 43px;
        margin-bottom: 30px;

        .item {
            width: 47%;
            height: 100%;
            background-color: #2e323b;
            border-radius: 4px;
            font-size: 16px;
            color: #fff;
            text-align: center;
            line-height: 43px;
        }
    }

    .search {
        display: flex;
        justify-content: space-between;
        align-items: center;

        .left {
            ::v-deep .van-checkbox__label {
                font-size: 14px;
                color: #a8aeae;
            }
        }

        .right {
            display: flex;
            align-items: center;
            width: 104px;
            height: 36px;
            background-color: #232830;
            border-radius: 18px;
            padding: 0 10px;

            .ipt {
                width: 60px;
                height: 26px;
                background-color: #232830;
                border: 0;
                font-size: 16px;
                color: #fff;
            }
        }
    }

    .cont {
        width: 100%;
        margin-top: 14px;

        .til {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            color: #556566;
        }

        .item {
            width: 100%;
            height: 49px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 0;
            box-sizing: border-box;

            .div1 {
                display: flex;
                align-items: center;
                font-size: 16px;
                color: #fff;
                margin-top: 10px;
                margin-bottom: 10px;

                img {
                    margin-right: 10px;
                }
            }

            .div2 {
                font-size: 13px;
                color: #fff;
                margin-right: 83px;
            }

            .div3 {
                font-size: 13px;
                color: #fff;
            }
        }
    }
}
</style>